1. Field of the Invention
The invention relates to optical disc drives, and in particular, to buffer management in random access optical discs.
2. Description of the Related Art
Writable optical disc technologies have been highly developed, and there are various standards such as CD-R, CD-RW, DVD-R, DVD+R, DVD-RW, DVD+RW, DVDRAM, HDDVD and Blue-Ray that allow data to be recorded onto a disc. FIG. 1 shows a conventional optical disc drive 120 coupled to a host computer 110. The host computer 110 may issue certain read or write commands to access an optical disc (not shown) installed in the optical disc drive 120. A typical read command comprises one or more destination addresses where data blocks are requested, and a write command also comprises specific one or more destination addresses where one or more data blocks are designated to be recorded thereto. Data blocks to be recorded may send from the host computer 110 in conjunction with the write commands. The optical disc drive 120 basically comprises a processor 122, a memory device 124 and a driving module 126. The memory device 124 is usually separated into two areas, a read buffer 130 and a write buffer 132. The read buffer 130 buffers data blocks acquired from the optical disc in response to the read commands. On the other hand, the write buffer 132 buffers data blocks to be recorded onto the optical disc. The driving module 126 include a mechanical unit comprising a pick up head (PUH), a motor and other controlling means (not shown) to perform physical data access of the optical disc.
Due to the spinning nature of the optical disc, a conventional recording operation can be performed easily in sequential mode, whereby data blocks buffered in the write buffer 132 are recorded sequentially according to their destination addresses. Some random access technologies have been proposed, allowing random recording of the optical disc. However, random recording is very inefficient for the driving module 126 because track seeking and locking consumes significant time. To improve efficiency, various buffer management methods are provided. For example, the write buffer 132 may be divided into a plurality of sections 134 each corresponding to a destination address. Each section 134 serves as a ring buffer to cache data blocks of adjacent destination addresses. In other word, it is better that buffered data blocks should have continuous destination addresses. In this way, data blocks with consecutive destination addresses have higher probability to be gathered, so the mechanical operations of track seeking and locking can be reduced to smoothen randomness of PUH moves. Since the scale of disc address is much larger than the buffer size, the effect is limited under very random and frequent disc access operations. It is therefore desirable to propose an enhanced buffer management method.